# coding:utf-8

from marshmallow import fields

from ..extensions import ma


class WxPaySchema(ma.Schema):
    """
    created by chenhj at 2017/8/15

    """
    set_id = fields.Int(required=True, error_messages={
        'required': '套餐类型不合法'
    })

wx_pay_schema = WxPaySchema()


class PricePackSetSchema(ma.Schema):
    """
    created by chenhj at 2017/12/4
    付费套餐schema
    """
    id = fields.Int()
    id_ = fields.Int(attribute='id')
    bid_point = fields.Int()
    gift_bid_point = fields.Int()
    ori_price = fields.Float()
    price = fields.Float()
    tag = fields.Str()
    name = fields.Str()

price_pack_set_schema = PricePackSetSchema(many=True)